package com.project2.controller;

import com.project2.bean.CommonData;
import com.project2.bean.PageBo;
import com.project2.bean.ResultVo;
import com.project2.bean.vo.DataInWxBrandDetailVo;
import com.project2.bean.vo.DataInWxBrandListVo;
import com.project2.service.WxBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangminghui
 * @date 2022/8/15
 */
@RestController
@RequestMapping("wx/brand")
public class WxBrandController {
    @Autowired
    WxBrandService wxBrandService;

    @RequestMapping("list")
    public ResultVo list(PageBo pageBo) {
        CommonData<DataInWxBrandListVo> data = wxBrandService.queryBrandListInfo(pageBo);
        return ResultVo.ok(data);
    }

    @RequestMapping("detail")
    public ResultVo detail(Integer id) {
        DataInWxBrandDetailVo data = wxBrandService.queryDataInWxBrandDetailVoById(id);
        return ResultVo.ok(data);
    }

}
